/**
 * Created by jin on 2015/8/25.
 */
$(document).ready(function () {
    $('.proA').click(function () {
        var get = new Array();
        proId ? get.push('proId/'+$(this).attr('proId')) : 0;
        Number(cityId) > 0 ? get.push('cityId/'+cityId) : 0;
        Number(levelId) > 0 ? get.push('levelId/'+levelId) : 0;
        jump(get);
        //window.location.href = url + ''
    });
    $('.cityA').click(function () {
        var get = new Array();
        proId >0 ? get.push('proId/'+proId) : 0;
        cityId ? get.push('cityId/'+$(this).attr('cityId')) : 0;
        levelId > 0 ? get.push('levelId/'+levelId) : 0;
        jump(get);
    });
    $('.levelA').click(function () {
        var get = new Array();
        proId > 0 ? get.push('proId/'+proId) : 0;
        cityId > 0 ? get.push('cityId/'+cityId) : 0;
        levelId ? get.push('levelId/'+$(this).attr('levId')) : 0;
        jump(get);
    });
    $('#clearProvince').click(function () {
        var get = new Array();
        levelId > 0 ? get.push('levelId/'+levelId) : 0;
        jump(get);
    });
    $('#clearLevel').click(function () {
        var get = new Array();
        proId > 0 ? get.push('proId/'+proId) : 0;
        cityId > 0 ? get.push('cityId/'+cityId) : 0;
        jump(get);
    });
    $('.HospitalDetail').click(function () {
        var get = new Array();
        get.push('hosId' + '/' + $(this).attr('hosId'));
        window.location.href = detailUrl + '/' + get.join('/');
    });
    function jump(get){
        window.location.href = url + '/' + get.join('/');
    }
});